<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <title>ThinkPHP示例：CURD操作</title>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Css/common.css" />
<script type="text/javascript" src="__PUBLIC__/Js/Base.js"></script>
<script type="text/javascript" src="__PUBLIC__/Js/prototype.js"></script>
<script type="text/javascript" src="__PUBLIC__/Js/mootools.js"></script>
<script type="text/javascript" src="__PUBLIC__/Js/Ajax/ThinkAjax.js"></script>
<script type="text/javascript" src="__PUBLIC__/Js/editor/kindeditor.js"></script>

 </head>
 <body><script language="JavaScript">
 <!--
    function add(){
        ThinkAjax.sendForm('form1','__URL__/insert',complete,'result');
    }
    function complete(data,status){
        if (status==1)
        {
             if(self.parent)
             {
             self.parent.tb_remove();
             self.parent.flexReload();
             }
             else
             {
             window.setTimeout(function (){window.location.href='__URL__/index',20000});
             }
        }
    }
    
    // KE.show({ 
        //id : 'id' //TEXTAREA输入框的ID 
  // });

    
 //-->
 </script>
 <div class="main">
 <h2>ThinkPHP示例之：CURD操作 [ 新增数据表单 ] </h2>
    <form id="form1" method='post' action="__URL__/insert">
 <table cellpadding=2 cellspacing=2>
   <tr>
    <td colspan="2"><div id="result" class="none result" style="font-family:微软雅黑,Tahoma;letter-spacing:2px"></div></td>
 </tr>
  		<tr>
			<td>id</td>
			<td><input name="id" type="text" value="<?php echo ($vo["id"]); ?>" ></td><!--
			<td>id</td>
		--></tr>
		<tr>
			<td>iso</td>
			<td><input name="iso" type="text" value="<?php echo ($vo["iso"]); ?>" ></td><!--
			<td>iso</td>
		--></tr>
		<tr>
			<td>name</td>
			<td><textarea id="name" name="name"><?php echo ($vo["name"]); ?></textarea></td><!--
			<td>name</td>
		--></tr>
		<tr>
			<td>printable_name</td>
			<td><input name="printable_name" type="text" value="<?php echo ($vo["printable_name"]); ?>" ></td><!--
			<td>printable_name</td>
		--></tr>
		<tr>
			<td>iso3</td>
			<td><input name="iso3" type="text" value="<?php echo ($vo["iso3"]); ?>" ></td><!--
			<td>iso3</td>
		--></tr>
		<tr>
			<td>numcode</td>
			<td><input name="numcode" type="text" value="<?php echo ($vo["numcode"]); ?>" ></td><!--
			<td>numcode</td>
		--></tr>

 <tr>
    <td><input type="hidden" name="ajax" value="1"></td>
    <td><input type="button" onClick="add()" class="button" value="保 存"> <input type="reset" class="button" value="清 空"></td>
 </tr>
 </table>
   </form>
</div>
 </body>
</html>